<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html;  charset=utf-8" />
<meta name="author" content="liushuai" />
<meta name="copyright" content="SINA 1996-2010" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta http-equiv="X-UA-Compatible" content="IE=7" />
<title>美食广场管理后台 - 首页</title>
<link href="/admin/style/user/admin.css" type="text/css" rel="stylesheet" media="screen" />
<script type="text/javascript" src="http://www.sinaimg.cn/cj/dfz/js/base_v_0.1.js" charset="utf-8"></script> 
<!--[if IE]>
<link href="/admin/sytle/user/admin_ie.css" type="text/css" rel="stylesheet" media="screen" />
<![endif]-->
<link href="/admin/style/user/widget/popup.css" rel="stylesheet" type="text/css" media="screen" />
<script type="text/javascript" src="http://www.sinaimg.cn/cj/dfz/js/base_v_0.1.js" charset="utf-8"></script> 

<script type="text/javascript" language="javascript">
//<![CDATA[
$(window).resize(function(){
	iframeResize($("#main-frame"));
});

/* 提供给子页调用的函数 */
function iframe_resize_by_child(){
	iframeResize($("#main-frame"));		
}
function iframeResize(o){
	var elems = {};
	elems["menuInner"] = $(".menu .menu-body .inner");
	elems["menuItemList"] = $(".menu .menu-body .inner .menu-item-list");
	elems["main"] = $(".main");
	elems["borderRight"] = $(".menu .border-right");
	
	for(var key in elems){
		elems[key].removeAttr("style");
	}
	try{
		$(o).width($("body").outerWidth()-$(".menu").outerWidth(true));	
		$(o).height($(o).contents().find("body").outerHeight(true));
		if($.browser.version==6.0 && $.browser.msie){//IE 6
			$(o).width($("body").outerWidth()-160);
			$(o).height($(o).contents().find("#container").outerHeight(true)+30);
		}
		elems["menuItemList"].css("height",elems["main"].outerHeight(true) 
			> elems["menuItemList"].height()?elems["main"].outerHeight(true):elems["menuItemList"].height());
		
		elems["menuItemList"].css("height",elems["menuItemList"].height()>$(window).height()
			?elems["menuItemList"].height():$(window).height());
			
		elems["borderRight"].css("height",elems["menuInner"].outerHeight(true));
	}catch(e){
		if($.browser.version==6.0 && $.browser.msie){
			$(o).width($("body").outerWidth()-160);
			$(o).height($(o).contents().find("body").outerHeight(true)+30);
		}
		elems["menuItemList"].css("height",elems["main"].outerHeight(true) 
			> elems["menuItemList"].height()?elems["main"].outerHeight(true):elems["menuItemList"].height());
		elems["menuItemList"].css("height",elems["menuItemList"].height()>$(window).height()
			?elems["menuItemList"].height():$(window).height());
			
			elems["borderRight"].css("height",elems["menuInner"].outerHeight(true));
	}
}

//]]>
</script>
</head>

<body>
<div class="header">
	<div class="logo">
    	<a href="/" target="_blank">
        	<span></span>
        </a>
    </div>
    <h1 class="title">
    	<font color=red>游戏秀</font>管理后台
    </h1>
    <div class="extra-info">
    	<div class="user-name">
        	当前登录用户：<em>{%$g_show.user_name%}({%$g_show.site_name%})</em>　选择功能：<em>{%$g_show.group_name%} </em>
        </div>
        <div class="logout">
        	<a href="logout.php">退&nbsp;出<span></span></a>
        </div>
    </div>
</div>
<div class="menu" id="leftmenu">
	<div class="menu-top"></div>
    <div class="menu-body">
    	<div class="inner" id="inner">
        	<ul class="menu-item-list" id="menu-item-list">
                {%foreach from=$g_show.priv_ary item=vo key=key%}
				<li id="tmp{%$i++%}">
					<a href="javascript:void(0);" onclick="show_tab('{%$i%}')" >{%$key%}<span></span></a>
					<ul id="tab_{%$i%}" style="display:none;">
						{%foreach from=$vo item=v%}
						<li><a href="{%if $v.sidebar%}{%$v.sidebar%}{%else%}{%$v.priv_link%}{%/if%}" target="main-frame">{%$v.priv_name%}<span></span></a></li>
						{%/foreach%}
					</ul>
				</li>
				{%/foreach%}
            </ul>
        </div>        
    </div>
    <div class="border-right"></div>
</div>
<div class="main">
	<iframe name="main-frame" style="width:100%;" id="main-frame" scrolling="no" frameborder="0" onload="javascript:iframeResize(this);" src="welcome.php"></iframe>
</div>

<script type='text/javascript'>
$(document).ready(function(){
	$("#group_select").bind("change",function(e){
		window.location.href = window.location.pathname+"?gid="+$(this).attr("value");
	});
});

function show_tab(i)
{
	
	$('#inner > ul > li').each(function(t){
	$("#tab_"+(t+1)).hide();
    });
	$("#tab_"+i).show();
	
}

</script>
</body>
</html>
